<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vueJS/vue.js"></script>
</head>

<body>
    <div id="watch-example">
        <p>
            Ask Yes/No question:
            <input v-model="question">
        </p>
        <p>
            {{answer}}
        </p>
    </div>
</body>

</html>
<script src="text/javascript">
    var watchExampleVM=new Vue({
        el:'#watch-example',
        data:{
            question:'',
            answer:'I cannot give you an answer until you ask a question'
        },
        whatch:{
            question:function(newQuestion,oldQuestion){
                this.answer='Wating for you to stop typing'
                this.debouncedGetAnswer()
            }
        },
        created:function(){
            
        }
    })
</script>